GXSkewTransform
You can use theGXSkewTransform
function to alter the mapping property of a transform object so that it skews its associated shape about a specified origin by specified horizontal and vertical factors.
void GXSkewTransform(gxTransform target, Fixed xSkew, Fixed ySkew, Fixed xOffset, Fixed yOffset);
target
- A reference to the transform object whose mapping property you want to alter.
hSkew
- The amount to skew in the horizontal direction.
vSkew
- The amount to skew in the vertical direction.
xOffset
- The horizontal coordinate of the origin to skew about.
yOffset
- The vertical coordinate of the origin to skew about.
DESCRIPTION
TheGXSkewTransform
function calculates a new mapping matrix for the transform object referenced by thetarget
parameter. When applied to a shape, the new mapping matrix performs the same mapping transformations on the shape as the original matrix, but the new matrix also skews the shape in the horizontal direction by the factor indicated by thehSkew
parameter, and in the vertical direction by the factor indicated by thevSkew
parameter. The new matrix skews the shape about the origin specified by thexOffset
andyOffset
parameters. (The origin is the point whose coordinates do not change as a result of the scaling operation.)The skew factors are expressed as a proportional amount of shift in one direction with distance in the perpendicular direction. A value of
0
for thehSkew
orvSkew
parameter indicates no skewing in the corresponding direction.The coordinates of the origin are specified in local space.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory transform_is_nil Warnings skew_transform_out_of_range Notices (debugging version) mapping_unaffected SEE ALSO
For an example of the use of this function, see Listing 6-3 on page 6-25.For information about mapping matrices in general, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.
To skew a shape by altering its geometry, use the
GXSkewShape
function, described on page 6-71.